package com.example.apkupdatedemo.Utils;

import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;

public class CheckLoaclInfo {
	
	//获取Androidmainfest.xml的信息
	public static PackageInfo getLocalInfo(Context context) {
		PackageInfo mPackageInfo = null;
		try {
			mPackageInfo = context.getPackageManager()
					.getPackageInfo(context.getPackageName(),
							PackageManager.GET_CONFIGURATIONS);
		} catch (NameNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return mPackageInfo;
	}
}
